Arrangement with an electric motor

ABSTRACT

The rotation speed of an electric motor (9) is controlled by a controller (6) which receives its setpoint from a characteristic function (23). The characteristic function (23) calculates a setpoint for the controller (6) on the basis of an originally analog variable A (2) that is converted to digital by an A/D converter AD (10), with the aid of support values of a &#34;MEM+DATA&#34; characteristic that are stored in a memory (4); those values not predefined by the support values are calculated by interpolation.

FIELD OF THE INVENTION

The invention concerns an electric motor and in particular an electricmotor having a characteristic function.

BACKGROUND OF THE INVENTION

Examples of electronically commutated motors are described, for example,in the following documents of the Applicant:

DE 44 41 372 A1 [(internal: D183)]=U.S. Pat. No. 5,845,045 JESKE

EP 0 658 973 B1 [(internal: EP184)]=U.S. Pat. No. 5,590,235 JESKE

DE 296 06 939.6-U [(internal: D190i)]=EP 0 739 084 A2

DE 195 15 944 A1 [(internal: D192)]

EP 0 741 449 A1 [(internal: EP193)]=U.S. Pat. No. 6,163,117

EP 0 744 807 B1 [(internal: EP194)]=U.S. Pat. No. 5,847,523

DE 195 18 991 A1 [(internal: D195)] DIETERLE et al. (publ. Jan. 23,1997)

DE 196 47 983 A1 [(internal: D199i)]=U.S. Pat. No. 6,091,887

EP 0 780 962 A2 [(internal: EP200)]

It would not be possible to reproduce the extensive content of thesedocuments in the present application even in summarized form, andreference is therefore made to their complete contents.

In DE 44 41 372 A1 and corresponding U.S. Pat. No. 5,845,045, therotation speed behavior of an electric motor is represented by acharacteristic n=f(T), a setpoint speed n being associated with eachtemperature T. In the case of a fan, for example, the rotation speed canthus be increased as the temperature rises. The rotationspeed/temperature behavior is determined, in this context, by analogcomponents. The accuracy achievable here is not great, however, due tomanufacturing tolerances in the components, and it is possible only withgreat effort to switch over to a different behavior.

SUMMARY OF THE INVENTION

It is therefore an object of the invention to make available a newelectric motor and a method for operating such an electric motor.

According to a first aspect of the invention, this object is achieved byan electric motor having a rotation speed controlled by a changeablephysical variable, in particular a temperature; having a characteristicfield, stored in the form of individual digital values, for theallocation of values of said physical variable to corresponding rotationspeed values of the electric motor; and having a microcontroller ormicroprocessor which has access to the stored individual digital values.An electric motor of this kind is very versatile, since because of thestored characteristic field its rotation speed behavior as a function ofthe changeable physical variable can easily be modified. It has provenparticularly advantageous in this context to store the individualdigital values at least partially in vector form, since this makes themsubstantially easier to process.

The invention additionally concerns a method for controlling a physicalvariable, in particular a rotation speed, having the following steps:

a) in order to ascertain the system deviation, a difference isdetermined between a desired value for the physical variable (in digitalform), and an actual value for the physical variable (also in digitalform);

b) the sign and absolute value of that difference are ascertained;

c) an analog memory element is charged or discharged, depending on thesign;

d) the duration of the charging or discharging operation is in each casesubstantially proportional to the magnitude of the ascertained absolutevalue of the difference;

e) a value dependent on the charge of the analog memory element is usedto influence the pulse duty factor of an actuating member that in turninfluences, with its output signal, the physical variable that is to becontrolled.

The result is to create a highly advantageous combination of digitalaccuracy in ascertaining the system deviation, and subsequent processingof that system deviation in order to influence the physical variable.

A further way of achieving the stated object is provided by a method fortemperature-dependent control of the rotation speed of an electric motorhaving the following steps:

a) value clusters of characteristic definition points are stored in amemory, said value clusters containing at least one value characterizinga specific temperature, and one rotation speed datum associated withthat temperature;

b) a present value characterizing the temperature that controls themotor rotation speed is sensed at time intervals;

c) that sensed value is compared to the stored values that characterizethe temperature and are contained in the stored value clusters;

d) a stored value adjacent to the present value is ascertained;

e) by way of an interpolation proceeding from that adjacent value, arotation speed datum for the sensed present value is ascertained;

f) a value derived from that interpolated rotation speed datum isconveyed to the electric motor.

It is thereby possible, by storing a small number of value clusters, todefine the rotation speed behavior of a motor as a function oftemperature.

The invention furthermore concerns a method for A/D conversion in anarrangement having a voltage divider containing a temperature-dependentresistor, one tapping point of that voltage divider defining thepotential at the one input of a comparator, and the potential at theother input of the comparator being determined by a capacitor that canbe charged via a constantcurrent source, having the following steps:

a) first the capacitor is discharged;

b) then a measurement is made of the time required for the capacitor, asit is charged by the constant-current source, to reach the potential ofthe other input;

c) that time is used as an indication of the temperature of thetemperature-dependent resistor.

A method of this kind can easily be implemented using a microcontrollerwhich controls or regulates functions of an electric motor. Thatmicrocontroller can effect discharge of the capacitor in step a), andcan provide time measurement as defined in step c), the overall resultbeing a very simple method.

Another way of achieving the stated object is provided by an electricmotor having discrete values, stored in a memory, which (in the form ofsupport values) define a temperature/rotation speed characteristic, thediscrete values being modifiable via a data connection to an inputdevice arranged outside the electric motor. This makes possible simpleadaptation of such a motor to different customer requirements.

A further way of achieving the stated object concerns a method foroperating an electronically commutated motor having associated with it amicroprocessor or microcontroller and a program associated therewith,that program serving to control a plurality of motor functions ofdifferent priorities, having the following steps:

a) a plurality of requestable routines necessary for operation of themotor are provided;

b) when a requestable routine is needed, a corresponding request signalfor it is set;

c) a higher-level program function is used to check which requestedroutine has the highest priority, and that highest-priority routine isexecuted first;

d) following execution of that highest-priority routine, the requestsignal associated with that routine is reset.

A method of this kind makes very good use of the available computingcapacity of a microprocessor or microcontroller, and makes it possibleto repeat specific time-critical interrogations or the like at intervalswhich do not exceed a predefined duration. These can be, for example,interrogations of a data bus by means of which data or instructions canbe conveyed to the motor. This method is preferably continuouslyrepeated, in the manner of a loop, while the motor is operating, theloop sequences being different depending on the type of routinerequested. It is particularly advantageous in this context if arequestable routine to be executed in the program can in turn generate,during its execution, a request signal for another requestable routineto be executed. This allows close concatenation of routines, betweeneach of which time-critical program steps can be executed.

A further way of achieving the stated object concerns a motor having amicroprocessor or microcontroller and a bus, in which the microprocessoror microcontroller controls both the bus and the motor. A motor of thiskind is very inexpensive due to the reduction in electronic components,and the elimination of further electronic components moreover makespossible a compact design for the motor. Because the entire controlsystem of the motor is displaced into the microprocessor ormicrocontroller, it is possible to make changes to the motor merely bychanging the software.

Further details and advantageous developments of the invention areevident from the exemplary embodiments which are described below anddepicted in the drawings—and which are to be understood in no way as alimitation of the invention.

BRIEF FIGURE DESCRIPTION

FIG. 1 is a schematic diagram of an arrangement according to the presentinvention;

FIG. 2 is an exemplary depiction of an embodiment of the invention;

FIG. 3 shows the pin assignment of the COP 842 CJ microprocessor;

FIG. 4 is a circuit diagram which shows the components for A/Dconversion and for processing of the Hall signal;

FIG. 5 is a flow chart for A/D conversion;

FIG. 6 shows the configuration of a counter used for A/D conversion;

FIG. 7 is a time diagram for the A/D conversion sequence;

FIG. 8 shows a characteristic with hysteresis;

FIG. 9 is a flow chart for a hysteresis function;

FIG. 10 is a flow chart for a sensor breakdown function;

FIG. 11 shows a sample definition for a characteristic having fourdefinition points;

FIG. 12 is a table of the definition points of the characteristic fromFIG. 11;

FIG. 13 is a flow chart for calculating the rotation speed setpoint fromthe characteristic definition;

FIG. 14 shows a characteristic having a point interpolated for aspecific temperature;

FIG. 15 is a flow chart with a variant of the procedure for calculatingthe rotation speed setpoint from the characteristic definition;

FIG. 16 shows a Hall signal and associated motor signals;

FIG. 17 is a flow chart of the Hall interrupt routine;

FIG. 18 is a circuit diagram with portions important for activating anEEPROM and access via a bus;

FIG. 19 is a circuit diagram with portions important for controlling anddriving the electric motor;

FIG. 20 is a flow chart for the basic rotation speed control process;

FIG. 21 is a flow chart for calculating the control output and the signfor the control process from FIG. 20;

FIGS. 22A through 22D illustrate the control process for a motor at thecorrect rotation speed;

FIGS. 23A through 23E illustrate the control process for a motor at toolow a rotation speed;

FIGS. 24A through 24E illustrate the control process for a motor at toohigh a rotation speed;

FIG. 25 shows an overall sequence for the control process;

FIG. 26 shows a preferred embodiment of a function manager;

FIG. 27 shows a function register used in the function manager;

FIG. 28 shows an A/D conversion routine modified for the functionmanager; and

FIG. 29 shows a control routine modified for the function manager.

DETAILED DESCRIPTION

OVERVIEW OF THE CHARACTERISTIC FUNCTION

FIG. 1 is a schematic depiction of an arrangement according to thepresent invention. A driver 7 of a motor 9 is controlled by a rotationspeed controller 6. Controller 6 receives an actual value 8 a for therotation speed of motor 9 from a tacho-generator 8, and receives asetpoint 23 a from a characteristic function 23. Characteristic function23 calculates a setpoint 23 a for rotation speed controller 6 on thebasis of an originally analog variable A 2 that is converted to digitalby an A/D converter 10, with the aid of support values of a “MEM+DATA”characteristic that are stored in a memory 4; those values notpredefined by the support values are calculated by interpolation.

OVERVIEW OF THE ELECTRIC MOTOR

FIG. 2 shows an overview of a preferred exemplary embodiment of anelectric motor according to the present invention. That motor iscontrolled by a microcontroller (μC) 11. Analog-digital converter (A/Dconverter) 10 is configured using a comparator 20 located in μC 11, andmakes possible digitization of the temperature detected via an NTCresistor 18. Comparator 20 has a negative input 21 (hereinafter alsoreferred to as CP− or CMPIN−), and has a positive input 22 (hereinafteralso referred to as CP+ or CMPIN+). These inputs can be controlled bythe program of μC 11, as will be described below.

A constant resistor 16 is connected in series with NTC (NegativeTemperature Coefficient) resistor 18 between a positive line 2 andground (GND) 100. Their connection point 21 a is connected to negativeinput 21.

A constant-current source 12 is also connected in series with acapacitor 14 between positive line 2 and ground 100, and theirconnection point 22 a is connected to positive input 22 of comparator20.

The potential at negative input 21 is determined by the temperature atNTC resistor 18, whose resistance decreases with increasing temperature,so that said potential drops with increasing temperature.

The potential at positive input 22 is determined by voltage u_(C14) atcapacitor 14. When positive input 22 is connected under program controlto ground 100, u_(C14) becomes zero; and when positive input 22 is thenswitched over to a high-resistance state (“tristate”), capacitor 14 ischarged via constant-current source 12 with a constant current, so thatu_(C14) rises linearly.

When the potential at point 22 a has reached the potential at point 21a, capacitor 20 is switched over to HIGH at its output 20 a. The timerequired for capacitor 14 to charge—starting from u_(C14)=0 V until theswitchover of output 20 a to HIGH—is therefore an indication of thetemperature. That time is converted in μC 11, in accordance with aselectable characteristic, into a setpoint for the rotation speed ofmotor 9.

Characteristic function 23 serves this purpose. It determines motorrotation speed setpoint 23 a from the temperature value digitized by A/Dconverter 10. It obtains for that purpose, by way of an EEPROM function24, parameter values from a nonvolatile memory, in this case an EEPROM26. EEPROM 26 can obtain values for a new characteristic via acommunication function 28 and a bus interface 30, in order to change thetemperature behavior of the motor. EEPROM is an acronym for ElectricallyErasable Programmable Read Only Memory.

Characteristic function 23 forwards the ascertained rotation speedsetpoint 23 a to rotation speed controller 6, which controls currentflow to the motor. This can be done, for example, via a control systemof a pulse-width modulation (PWM) generator 34, or a block controlsystem 45. Regarding the block control system, reference is made, by wayof example, to DE 44 41 372.6 and corresponding U.S. Pat. No. 5,845,045.

PWM generator 34 has an actuating signal 33 controlled by the rotationspeed controller, a triangular signal generator 35, and a comparator120. Reference is made to FIG. 19 regarding the function of an exemplaryPWM generator 34.

As a simple example, FIG. 2 depicts an electronically commutated motor 9having a single phase 38. Current flows to this phase 38 through atransistor output stage 36, here in the form of a complete bridge 37. AHall generator 40 supplies a drive function 42 with information aboutthe instantaneous position of rotor 39. Drive function 42 ensurescorrect commutation of motor 9, and safe operation (e.g. if motor 9 isoverloaded).

A current limiter 44 reduces the flow of current to output stage 36 ifthe current in the single phase 38 becomes too high, for example duringmotor startup.

Preferred values for the electronic components used in the individualFigures are indicated at the end of the specification, and the reader isreferred thereto.

FIG. 3 shows the pin assignment of microcontroller (μC) 11—model COP 842CJ of National Semiconductor—used in the exemplary embodiment. Thedesignations inside μC 11 correspond to the manufacturer's designations;the outer designations on each line indicate the references usedprincipally in the application. To identify its position, a blackquarter-circle is inscribed at the top left and is also shown in thefigures which follow.

FIG. 4 shows a detailed circuit diagram of A/D converter 10 (FIGS. 1 and2) with the components for A/D conversion and for processing of the Hallsignal from Hall sensor 40. The Hall signal supplies the actual value ofthe motor rotation speed.

An oscillator crystal 97, which is connected to terminals CK0 and CK1(cf. FIG. 3) of μC 11, defines its clock frequency (e.g. 10 MHz). Resetinput Res (FIG. 3) is connected via a capacitor 99 to ground 100 and viaa resistor 101 to +Vcc. These two components generate a power-up resetat startup in the usual way.

Hall generator 40, e.g. model HW101A, is connected via a resistor 106 to+Vcc to supply current, and to ground 100. Its output signal u_(H) isconveyed to the two inputs of a comparator 108 (e.g. LM2901D) which hasa filter capacitor 110 associated with its Vcc input. The output ofcomparator 108 is connected via a feedback resistor 112 to the positiveinput of comparator 108, and via a “pullup” resistor 114 to +Vcc. Theoutput of comparator 108 is also connected directly to the Hall port(FIG. 3) of microprocessor 11, so that a Hall signal controlled by rotormagnet 39 is obtained there. That signal always has a value HALL=0during one rotor rotation of 180° el., and a value HALL=1 during thenext rotation of 180° el. Analysis thereof is explained below withreference to FIG. 17. Each change from HALL=1 to HALL=0 or vice versaresults in an interrupt operation in μC 11.

NTC resistor 18 of A/D converter 10 is connected at one end to ground100. At its other end, it is connected to resistor 16 which is connectedat its other end to +Vcc. Connection 21 a between NTC resistor 18 andresistor 16 is connected via a protective resistor 89 and a filterelement (comprising a capacitor 90 and a resistor 91) to output CP−(FIG. 3) of μC 11. Capacitor 14 is connected at one end to ground 100,and at its other end to a resistor 96 which in turn is connected to+Vcc. Connection 22 a between capacitor 14 and resistor 96 is connectedto constant-current source 12 and to input CP+. Constant-current source12 has a pnp transistor 95 (e.g. BC8568) whose base voltage is definedby resistors 92 and 93 and whose current on the emitter side is limitedby a resistor 94.

A/D CONVERTER

FIG. 5 is a flow chart for the A/D converter.

In step S100 of FIG. 5, a watchdog timer WDCNT 79 (FIG. 6) of μC 11 isloaded with a hexadecimal value 0xFF (hexadecimal values are identifiedby a “0x” prefix), and started by setting bit WDREN to 1. Watchdog timerWDCNT 79 is operated in a mode in which it decrements its value at fixedtime intervals, and triggers an internal reset in μC 11 when it reacheszero. To prevent this reset, watchdog timer WDCNT 79 must beperiodically reloaded by the program. This yields increased reliability,since μC 11 is not reloaded if, for example, the program crashes; ittherefore automatically experiences a reset and then restarts (watchdogfunction).

In S102, the two counter registers CNT_LB 82 and CNT_HB 81 (FIG. 6) areset to zero.

Inputs CP− and CP+ of comparator 20 (cf. FIG. 2 and FIG. 3) areconfigured in S104. CP+ is set to LOW (ground), so that capacitor 20 isdischarged. CP− is set to TRISTATE, so that a voltage determined byresistor 16 and NTC resistor 18 is present at CP−. The TRISTATE state ofa port means that the port is governed neither by +Vcc nor by ground100, but rather is isolated.

The main loop constituted using watchdog timer WDCNT 79 begins in stepS106. Watchdog timer WDCNT 79 is loaded (as in step S100) with the value0xFF, and started with WDREN:=1. After steps S108 through S118 describedbelow have been run through, step S120 checks whether watchdog timerWDCNT 79 has yet reached a value 0xFB, i.e. has been decremented fourtimes. If so (Y=YES), then counter CNT80 constituted from the two bytesCNT_LB 82 and CNT_HB 81, which can be represented as (CNT_HB, CNT_LB)(cf. FIG. 6), is incremented in S122 and execution jumps back to S106.If it was found in S120 that watchdog timer WDCNT 79 was greater than0xFB, a jump back to S108 takes place. Since watchdog timer 79decrements at 256-μs intervals, these four decrement steps to 0xFBcorrespond to a time of 1024 μs. Counter CNT80 constituted from CNT_LB82 and CNT_HB 81 thus has a resolution of 1024 μs=1.024 ms.

FIG. 6 schematically shows, in this context, the construction of counterCNT80 constituted from CNT_LB 82 and CNT_HB 81. The two 8-bit countersCNT_HB 81 and CNT_LB 82 are used together as 16-bit counter CNT80;CNT_LB 82 is the low byte, and CNT_HB 81 is the high byte. The leastsignificant bit of each byte is in each case labeled LSB, and the mostsignificant bit MSB. Each byte has eight bits.

Watchdog timer WDCNT 79 decrements, for example, by 1 every 256 μs. As aresult of the, for example, 4:1 frequency division in S106 and S120(FIG. 5), counter CNT80 is incremented every 1.024 ms. This correspondsto a frequency of approximately 1000 Hz. If an overflow occurs duringthe incrementing of CNT_LB 82 (i.e. CNT_LB 82 has a value 0xFF and isincremented), CNT_LB 82 then acquires a value 0x00, and an overflow bit(carry bit) is set. After the incrementing of CNT_LB 82, a zero is addedto CNT_HB 81 to account for the carry bit; in other words, CNT_HB 81 isincremented at every 256th increment of CNT_LB 82, and CNT_HB 81 thushas a resolution of approx. 256 ms and therefore can represent a maximumtime value of approx. 65.5 seconds. Counter CNT80, which is made up ofthe two 8-bit counters CNT_HB 81 and CNT_LB 80, thus functions as a16-bit counter which is incremented by 1 after every four decrementsteps of watchdog timer WDCNT 79.

Although CNT_LB 82 and CNT_HB 81 together act as a counter CNT80, theyhave several different functions:

In A/D conversion, CNT_LB 82 acts as a counter for the time required forcapacitor 14 to charge, via transistor 95, to the point that the voltageat CP+ 22 is as high as the voltage (temperature-dependent via NTCresistor 18) at CP− 21; in other words, its count is an indication ofthe temperature of NTC resistor 18.

CNT_HB 81 serves as a counter for the time between successive A/Dconversions. That time can be set, for example, to one second.

The least significant bit (LSB) 83 of CNT_HB 81 additionally serves asan indicator of an overflow of CNT_LB 81 during A/D conversion.

Steps S108 through S120 that are executed in the lower portion of thewatchdog timer loop (FIG. 5) are described below.

S108 checks whether CNT_HB has a value 0x00, If so, then in S110 theprevious NTC value NTC_VAL is saved in NTC_OLD; CNT_HB is set to 0xFC;CP+ 22 is set to TRISTATE so that capacitor 14 is charged via transistor95 (FIG. 4) (connected by way of resistors 92, 93, and 94 as aconstant-current source) and thus allows the voltage at CP+ 22 to riselinearly; and comparator 20 is started with CMPEN:=1. After thechangeover of CNT HB to 0x00, register CNT LB also has a value 0x00, sothat it acts as a counter for the time required for the voltage presentat CP+ 22 to equal the voltage present at CP− 21.

The operation of setting register CNT_HB to 0xFC defines the timebetween the individual A/D conversions. Since register CNT_HB has aresolution of approx. 256 ms, a new A/D conversion is performed afterevery four increments (0xFC to 0xFD to 0xFE to 0xFF to 0x00), i.e. afterapproximately one second. A value other than 0xFC can be selected, butit must be greater than 0x00 so as not to start a new A/D conversionimmediately; and its least significant bit 83 (FIG. 6) must be 0 so thatit can be used as an indication of an overflow of CNT_LB 82 during theA/D conversion.

Until the voltage at CP+ 22 (defined by capacitor 14 charged byconstant-current source 12 (FIG. 4)) has reached the voltage at CP− 21that is temperature-dependent on NTC resistor 18, execution cyclesthrough S108 and S112 in the lower part of FIG. 5 without executingadditional steps. When the voltage at CP+ 22 equals the voltage at CP−21, the comparator switches its comparator read bit (CMPReadBit) toHIGH, and execution branches from the comparison in S112 to S114.

S114 checks, based on least significant bit (LSB) 83 of CNT_HB 81,whether an overflow of CNT_LB 82 has taken place during the A/Dconversion. The value range 0x00 to 0xFF of CNT_LB 82 is intended to beutilized as completely as possible for D/A conversion. It may thereforehappen, within the production tolerances of the comparator circuit, thatan overflow still takes place for values in the upper range (i.e. at lowtemperatures). That overflow can be detected because least significantbit 83 has acquired a value of zero when CNT_HB 81 is set in S110. If anoverflow of CNT_LB has occurred, least significant bit 83 of CNT HB 81then has a value of 1. If so, CNT_LB is then assigned the maximum value0xFF in S116; otherwise execution branches from S114 directly to S118.

In S118, the value of CNT_LB is inverted and is stored in registerNTC_VAL. Inversion converts CNT_LB to a value of (255−CNT_LB), so thatnow a small NTC value NTC_VAL corresponds to a low temperature, and alarge NTC_VAL to a high temperature. The comparator is stopped byCMPEN:=0, and CP+ 22 is set to LOW so that capacitor 14 is dischargedbefore the next A/D conversion, which takes place when CNT_HB hasreached a value of zero.

FIG. 7 is a time diagram for the A/D converter. CNT_HB 81 serves as acounter for the time between the individual A/D conversions. Itinitially has a value of 0xFF, and CP+ is LOW (i.e. capacitor 14 isdischarged).

At time 84 or 84′, CNT_HB 81 kicks over to 0x00, thus starting the A/Dconversion. CNT_HB 81 is set to 0xFC in order to define the time perioduntil the next A/D conversion, and CP+ is set to TRISTATE in order toallow capacitor 14 to charge.

At time 85 or 85′, voltage U_(C14) of capacitor 14 equals potential 86at node 21 a, and variable CMPReadBit changes its state from 0 to 1. Acheck is now made as to whether an overflow of CNT_LB 82 has occurred;comparator 20 (FIG. 2) is switched off; and CP+ is switched to LOW, sothat capacitor 14 is once again discharged. The next A/D conversiontakes place when CNT_HB increments from 0xFF to 0x00, i.e. at time 84′.

HYSTERESIS AND SENSOR BREAKDOWN FUNCTION

The actual calculation of the rotation speed setpoint by thecharacteristic function is preceded by a hysteresis and sensor breakdownfunction.

FIG. 8 shows a characteristic 180 (thin solid line) with hysteresis 182(thin dashed line), in which a sample curve 184 for temperature androtation speed setpoint is plotted (thick solid line).

As temperature T increases, rotation speed setpoint n_s changes frompoint 185 along the solid characteristic 180 to point 186.

As the temperature decreases, the rotation speed setpoint remainsconstant until the dashed hysteresis curve is reached at point 187. Therotation speed setpoint then drops to the rotation speed setpointdefined for that temperature by the solid characteristic, at point 188.

As the temperature rises, the rotation speed setpoint changes alongcharacteristic 180 from point 188 to point 189, where the sample curve184 ends. The hysteresis thus counteracts any oscillation in rotationspeed, since as the temperature decreases, the rotation speed is notreduced until the temperature has decreased by a specific minimum value.

FIG. 9 shows the hysteresis flow chart. Hysteresis is achieved bycomparing the temperature value NTC_VAL digitized by the A/D converterto the previous (and previously stored) value NTC_OLD. If NTC_VAL isgreater than NTC_OLD, it is used to calculate rotation speed setpointn_s (S210), since the temperature has increased. If the response is No,then in step S212 NTC_VAL is subtracted from NTC_OLD. If the differenceis greater than a hysteresis value HYST, the hysteresis routine ends andexecution continues with the value NTC_VAL (S212). Otherwise the oldvalue NTC_OLD is assigned to the value NTC_VAL (S214). The hysteresisvalue HYST can be loaded into the RAM region of μC 11 when the motor isconfigured, and can thus be programmed as desired. The hysteresisfunction allows the motor to change speed quietly.

FIG. 10 is a flow chart of a sensor breakdown function. The sensorbreakdown function is a safety function that, in the event of damage toNTC resistor 18 (FIG. 4) or its connections (called a “sensorbreakdown”), defines a so-called sensor breakdown rotation speed as therotation speed setpoint. For example, if the NTC resistor is defectiveand has a resistance equal to infinity, a very small NTC value NTC_VALis obtained. A sensor breakdown temperature value T_SA is thereforedefined, and for any NTC value NTC_VAL that is less than T_SA, it isassumed that a sensor breakdown exists.

In S200, the NTC value NTC_VAL obtained from the A/D conversiondescribed above is compared to the sensor breakdown temperature valueT_SA, which is also 1 byte long (e.g. T_SA:=0 x38). If NTC_VAL isgreater, calculation of rotation speed setpoint n_s is continued asdescribed in the Figures which follow (S202). If NTC_VAL is less,however (i.e. if a sensor breakdown exists), the entire rotation speedcalculation is skipped, and a sensor breakdown rotation speed n_SA(S204), usually the motor's maximum rotation speed, is used for rotationspeed setpoint n_s.

The values T_SA and n_SA are loaded into the RAM region of μC 11 whenthe motor is configured, and can thus be programmed as desired.

CHARACTERISTIC FUNCTION

The NTC value NTC_VAL ascertained by A/D conversion is now convertedinto a rotation speed setpoint.

FIG. 11 shows, by way of example, a characteristic n=f(T) defined byfour characteristic definition points (solid circles numbered 1 through4). For example, a temperature of 0° C. (point 1) corresponds to arotation speed of 2000 rpm, as does a temperature of 30° C. (point 2). Atemperature of 60° C. (point 3) corresponds to 4000 rpm, as does atemperature of 100° C. (point 4). In this exemplary embodiment, there islinear interpolation between temperature/rotation speed points 1, 2, 3,and 4. Microcontroller 11 calculates the necessary intermediate points.

Defining a characteristic using only a few characteristic definitionpoints saves a great deal of memory and allows the characteristic to beeasily changed by storing points with new values. If a sensor breakdownfunction is used, the definition point with the lowest temperature isselected as the temperature T_SA+1 following the sensor breakdowntemperature T_SA (cf. S200 in FIG. 10). If a sensor breakdown functionis not used, the definition point with the lowest temperature isselected as the lowest measurable temperature (characteristictemperature value 0x00, corresponding e.g. to a temperature of −62° C.)

The definition point with the highest temperature can be selected as thehighest possible temperature (0xFF, assuming one byte of memory space).An alternative is to select the rotation speed of the last definitionpoint for all temperature values that are greater than the lastdefinition point. The last definition point can then also have a lowertemperature value than 0xFF.

FIG. 12 shows the stored temperature and rotation speed values for eachcharacteristic definition point P of the characteristic in FIG. 11. Eachvalue is indicated in physical and program-specific magnitudes. Eachtemperature value T occupies one byte of memory, and the associatedrotation speed value n occupies two bytes. An additional slope S=n/T(two bytes) is optionally also stored in order to speed upinterpolation. The most significant bit of the two bytes of the slopeserves as a sign bit, so that negative slopes are also possible. Theassignment of program-specific temperature memory values (0x00 to 0xFF)to the physical outside temperature depends on the circuitry of the A/Dconverter. For example, a temperature memory value of 0x10 can alsocorrespond to a negative physical temperature of −10° C.

FIG. 13 is a flow chart for the rotation speed setpoint calculationroutine. In this example, the characteristic definition points each havea temperature value, a rotation speed value, and a slope which is validfor the region from the characteristic definition point to the nextcharacteristic definition point. When μC 11 is started, the temperaturevalues T (FIG. 12) are read out from EEPROM 26 and read into the RAMregion of μC 11 to allow quick access. Because of limited RAM, therotation speed values and slope values remain in EEPROM 26 and areloaded from there as needed. In EEPROM 26, all the temperature valuesare stored one behind another in one block, and the rotation speed and(optionally) slope values, one behind another, in another block. Ifsufficient RAM space is available, the rotation speed and slope can thenalso be loaded into the RAM of μC 11.

Upon branching to the rotation speed setpoint calculation routine, inS300 counter N is set to 1. The temperature values are stored as a tableT(N), and in S302, a comparison is made to determine whether the Nthtemperature value T(N) is less than NTC_VAL. If so, execution branchesto S301 and N is incremented by 1. Execution then branches back to S302.If NTC_VAL is no longer greater than T(N), this means either thatNTC_VAL=T(N) or that NTC_VAL lies between T(N) and T(N−1). Identity ischecked in S304. If identity exists, rotation speed setpoint n_s is setequal to rotation speed setpoint n(N) of characteristic definition pointN, and execution branches to the end.

If T(N) is not equal to NTC_VAL in S304, then in S306 variable A isgiven the value N−1; i.e. A corresponds to the characteristic definitionpoint preceding characteristic definition point N.

Lastly, in S307, rotation speed setpoint n_s is then calculated forNTC_VAL.

FIG. 14 shows an example in this context for a value NTC_VAL 159 thatlies between the second and third definition points of a characteristic.A thus has a value of 2.

The distance X between temperature value T(A) and NTC_VAL is ascertainedby subtraction (S307). The rotation speed setpoint n_s associated withNTC_VAL is ascertained by adding the product of X and slope S(N) torotation speed n(A) of point A, i.e. n_s:=n(A)+X*S(N).

One possible variant of this type of interpolation is to define theslope to the left, i.e. from the particular characteristic definitionpoint N toward characteristic definition point N−1. In this case thecalculation of n_s (S306, S307) proceeds not from point N−1 but frompoint N.

FIG. 15 shows the calculation of the rotation speed setpoint for thecase in which a slope is not stored along with the characteristicdefinition points. Steps S300 to S305 of FIG. 13 are executedidentically. But if T(N) is not equal to NTC_VAL in S304, then in S306′the two characteristic definition points surrounding NTC_VAL 159 (FIG.14) are defined as A:=N−1 and B:=N (see FIG. 14). In S307′, the slope Sbetween points A and B is then calculated starting from point A. Thetemperature difference D_T (T) is calculated by subtracting T(A) fromT(B), the rotation speed difference D_n (n) by subtracting n(A) fromn(B), and the slope S by dividing D_n by D_T. The distance X betweenNTC_VAL and the temperature value T(A), and the rotation speed setpointn_S, are calculated as in FIG. 13.

It is evident from the description of FIG. 15 that storing a slope foreach characteristic definition point eliminates some of the calculationsin S307 (FIG. 13) and thus also economizes on program code and programexecution time.

CONVERTING THE ROTATION SPEED SETPOINT INTO A “HALL LENGTH” HL_s

FIG. 16 shows a diagram with the Hall signal HALL (FIG. 4) which ispresent at port INT of μC 11 (FIG. 4), the associated values for OUT1and OUT2 (FIG. 19), and the times at which the Hall interrupts occur.The Hall signal is the basis for commutating the OUT1 and OUT2 signals(FIG. 19) for controlling motor 9, and calculating the actual Halllength HL_i, as shown here in an exemplary embodiment. Each change inHALL triggers in μC 11 a Hall interrupt which is identified by a Y inFIG. 16. Since commutation must be very precise in order for the motorto run quietly, this interrupt takes priority over all other operationsin the motor, i.e. it interrupts all other currently running processes;although the instruction currently in progress is still executed, thenthe instruction sequence of this interrupt executes, and then thepreviously interrupted process resumes.

FIG. 17 shows an example of a Hall interrupt routine that is executed ateach Hall interrupt.

In S320, Hall length HL_i is determined. A present timer value t_A isread out from a timer, and Hall length HL_i:=t_A−t_0 is calculated bysubtracting the stored timer value t_0 from the time of the previoustimer interrupt. Present timer value t_A is then stored in t_0 (S320).The resolution of the timer used in this exemplary embodiment is 1 μs,and Hall length HL_i is therefore available in μs. It is an indicationof the rotation speed of motor 9.

Commutation is performed in the steps which follow. S322 checks whetherHALL=1 (is HIGH). If HALL=1, then in S324 OUT2 is set to LOW. OUT1 andOUT2 are now LOW, and in S326 a commutation time gap is inserted inorder to prevent a short circuit in bridge circuit 37 duringcommutation. The commutation gap is, for example, 50 μs long. In S328,OUT1 is set to HIGH. Lastly, in S329 port HALL is configured to definethe edge at which it will trigger a Hall interrupt HALL_INT. The edgecan be set so that an interrupt is triggered either at the transitionfrom HIGH to LOW (falling edge) or at the transition from LOW to HIGH(rising edge). Since the Hall signal is HIGH in the branch S324 to S329,port HALL must be set to a falling-edge interrupt, i.e. from HIGH toLOW, so that a Hall interrupt is triggered at the next Hall change.

If HALL=0 (is LOW) in S322, then the reverse commutation, and thereverse setting of HALL_INT, occur analogously in S330 to S335.Reference is made to DE 197 00 479.2 (internal: D201i) concerningtime-shifting of the commutation times.

Conversion of the rotation speed setpoint n_s (in units of revolutionsper minute) into a “Hall length” HL_s is now explained. Hall length HL′(in seconds) is defined as

HL′=T/P

where T is the period length of one rotor rotation (in seconds) and Pthe number of rotor poles. If

T=1/f and f=n/60

where f is the frequency (in Hz) and n the rotation speed (in rpm), then

HL′=60[s]/(n/[min⁻¹ ]P).

Since the Hall length measured with the Hall sensor is available in μs,HL′ is renormalized to HL_s:

HL_s=1,000,000 HL′

For P=4, i.e. a four-pole rotor, the result is:

HL_s=15,000,000 [μs]/(n/[min⁻¹])

The desired rotation speed n_s=2870 min⁻¹ corresponds, for example, to aHall length HL_s of

HL_s=15,000,000 μs/2870=5226 μs. The internal hexadecimal representationof this is 0x146A. See FIG. 20 for the evaluation of HL_i and HL_s.

EEPROM FUNCTION

FIG. 18 shows the portion of the circuit concerning EEPROM 26 and businterface 30. The pin assignment of μC 11 is once again evident fromFIG. 3. Parts identical or functionally identical to those in previousFigures are labeled with the same reference characters as therein.EEPROM 26 is, for example, an ATMEL AT24C01A two-wire serial CMOSEEPROM.

EEPROM 26 receives signal ESDA (FIG. 3) of μC 11 at its data input SDA,and signal ESCL at its input SCL. Both lines are connected via resistors172, 173 to +Vcc.

Write-protect input WP of EEPROM 26 is connected to pin CS (chip select)of μC 11. If CS is HIGH, EEPROM 26 is write-protected; if CS is LOW,data can be written into EEPROM 26. Terminals VSS, AD, A1, and A2 ofEEPROM 26 are connected to ground 100, and terminal VCC of EEPROM 26 isconnected to +Vcc.

Lines ESDA and ESCL thus constitute the serial bus between μC 11 andEEPROM 26, which can be operated as an IIC bus.

Normally EEPROM 26 is programmed once at the factory via bus interface30, but reprogramming is possible at any time. EEPROM 26 can also serve,for example, as an operating data memory, for example for switch-oncycles, maximum recorded temperature, operating hours, and manufacturingdata.

Bus interface 30 operates with an IIC bus. It has a data line DATA witha terminal 160 that is connected via a resistor 162 to terminal SDA ofμC 11. From terminal SDA, a resistor 165 leads to +Vcc and a capacitor167 is connected to ground 100. Terminal SDA is also connected to theemitter of a pnp transistor 168 whose collector is connected to ground100 and whose base is connected via a resistor 169 to terminal N16 of μC11.

Bus interface 30 furthermore has a clock line CLOCK with a terminal 161that is connected via a resistor 163 to terminal SCL of μC 11. Fromterminal SCL of μC 11, a resistor 164 leads to +Vcc and a capacitor 166goes to ground 100.

The purpose of the circuit with pnp transistor 168 is to connect bothoutput N16 and input SCL of μC 11 to the bidirectional DATA line of theIIC bus.

Reference is made to DE 198 26 458.5 corresponding to PCT/EP99/03992,published Dec. 23, 1999 as WO 99-66633, whose US National Phase is U.S.Ser. No. 09/719,440, KARWATH, HORNBERGER, JESKE, RAPPENECKER &KALTENBRUNNER, filed Dec. 12, 2000 for a more detailed description ofEEPROM 26 and bus interface 30 and their programming.

Password protection can be implemented by the fact that when twoparticular successive bytes (e.g. bytes 0xFA and 0x4A) are transferredfrom external IIC bus 30 to μC 11, a B_ACCESS bit is set in μC 11 in amemory location ACCESS; and when B_ACCESS is set, additional functionsfor modifying parameters, reading out EEPROM 26, and/or writing toEEPROM 26 are available. It is thus possible, for example, to protectagainst unauthorized modification of the characteristic by a customer.

An operating hour counter can also be interrogated via bus 30. This isimplemented by the fact that when the fan is started, a 24-bit valueWRK_TIME, comprising three bytes, is loaded from EEPROM 26 into μC 11,and every 10th time an A/D conversion begins (i.e. every 10 minutes, inthe example above), the WRK_TIME 24-bit counter is incremented by 1 andwritten back into EEPROM 26. The value of WRK_TIME can then beinterrogated, for example, via IIC bus 30. A further counter WRK_10 isused to count off every 10 A/D conversion operations.

CONTROLLING THE MOTOR

FIG. 19 shows the portion of the circuit important for controlling anddriving the motor. The pin assignment of μC 11 is evident once againfrom FIG. 3. Outputs OUT1 and OUT2 of μC 11 control npn transistors 141,142, 143, and 144, connected as H-bridge 37. The current through statorwinding 38 flows in one or the other direction depending on whether OUT1is HIGH and OUT2 is LOW, or vice versa. Between switchovers, OUT1 andOUT2 are both briefly LOW in order to prevent short-circuiting in bridge37. Commutation is accomplished electronically, and the position ofrotor 39 is sensed via Hall sensor 40 which is described in more detailin FIG. 4.

An output RGL of μC 11 is connected via a resistor 123 to a capacitor124. When RGL is HIGH, capacitor 124 is charged; when RGL is LOW, thecapacitor is discharged; and if RGL is at TRISTATE, capacitor 124 isdecoupled from RGL and retains its voltage. Without current limiter 44,which is described later, point 125 could be connected directly to thepositive input of comparator 120.

When npn transistor 150 is nonconductive (i.e. current limiter 44 isinactive), resistor 126 causes the voltage at a smaller capacitor 127 tobe the same as at capacitor 124. The voltage at the positive input ofcomparator 120 can thus be influenced via output RGL of μC 11.

A triangular signal generated by a triangular oscillator 35 is presentat the negative input of comparator 120. Triangular oscillator 35 has acomparator 130. From output P3 of comparator 130, a positive feedbackresistor 132 leads to its positive input, and a negative feedbackresistor 131 similarly goes from output P3 of comparator 130 to thenegative input of comparator 130. A capacitor 135 is located between thenegative input of comparator 130 and ground 100. The output ofcomparator 130 is additionally connected via a resistor 133 to +Vcc. Thepositive input of comparator 130 is connected via two resistors 134 and136 to +Vcc and ground 100, respectively.

Three potential points P1, P2, and P3 are indicated in FIG. 19 toexplain the operation of triangular generator 35. When the arrangementis switched on, P1 is connected to ground 100 through the dischargedcapacitor 135, and P2 is connected to +Vcc through 134 and is thusgreater than P1. The comparator output (and thus P3) are therefore HIGH.Capacitor 135 is therefore charged via resistors 133 and 131, and thepotential at P1 and thus the triangular signal increase. The value of P2is defined by

a) the parallel circuit made up of resistors 134, 133, and 132; and

b) the lower voltage divider resistor 136.

The charging of capacitor 135 ultimately causes P1 to become higher thanP2, and output P3 of comparator 130 therefore switches to LOW (i.e.ground). P3 thus goes to zero. Capacitor 135 therefore begins todischarge through resistor 131 and comparator 130, and this yields thefalling portion of the triangular signal. The value of P2 is now definedby

a) the parallel circuit made up of resistors 132 and 136; and

b) voltage divider resistor 134.

When the discharging of capacitor 135 causes P1 to fall below P2,comparator 130 switches back to HIGH, i.e. +Vcc is once again present atP3. A triangular signal at, for example, 25 kHz is thus created.

When the voltage of the triangular signal at the negative input ofcomparator 120 is less than that of the reference signal at the positiveinput of comparator 120, the OFF output of comparator 120 is thus HIGH,and the lower transistors 141 and 143 can be switched by logical ANDelements 147 and 148 through OUT1 and OUT2, respectively. When thevoltage of the triangular signal is greater than that of the referencesignal, the OFF output of comparator 120 is LOW, and current thus cannotflow through stator winding 38.

The voltage at capacitor 124 and thus also at capacitor 127 is thus usedto establish the “pulse duty factor,” i.e. the ratio between the timeduring which the output of comparator 120 is HIGH during one period ofthe triangular signal, and one complete period. The pulse duty factorcan be between 0% and 100%. If the motor rotation speed is too high, forexample, capacitor 124 is discharged via RGL and the pulse duty factoris thus decreased. All of this is referred to as pulse-width modulation(PWM). The purpose of pullup resistor 128 is to pull the open-collectoroutput OFF of comparator 120 to +Vcc in the HIGH state.

To enable the motor to start when it is switched on, capacitor 124 ischarged via RGL for a predefined period at initialization, so that thevoltage at capacitor 127 reaches the necessary minimum value foractivation of bridge 37.

Current limiter 44 is implemented by the fact that the current in statorwinding 38 flows via a measurement resistor 140 to ground 100. Thehigher the current through resistor 140, the higher the voltage thereand thus also the potential at point 149.

When the potential at 149 reaches a specific value, transistor 150becomes conductive and reduces the voltage at capacitor 127, and thepulse duty factor at the output of comparator 120 thereby decreases.Resistor 126 prevents the large capacitor 124 from also being dischargedwhen current limitation is effective, and speeds up current limitationbecause the small capacitor 127 can discharge quickly. After activecurrent limitation is complete, the smaller capacitor 127 is rechargedvia capacitor 124, and thus set to its voltage. Resistor 126 andcapacitor 127 thus act to prioritize current limiter 44.

Current limiter 44 has a filter element made up of a resistor 151 and acapacitor 152 to ground, followed by npn transistor 150 which, when thevoltage at its base is sufficiently high, pulls the positive input ofcomparator 120 to ground 100. Following this is a further filter elementmade up of resistors 153 and 155 and capacitor 154.

Reference is made to DE 198 26 458.5 corresponding to PCT/EP99/03992,published Dec. 23, 1999 as WO 99-66633, whose US National Phase is U.S.Ser. No. 09/719,440, KARWATH, HORNBERGER, JESKE, RAPPENECKER &KALTENBRUNNER, filed Dec. 12, 2000 for a description of an alternativeform of current limitation. As described there, it can also beconfigured and program-controlled using a comparator.

CONTROL ROUTINE

FIG. 20 shows a motor rotation speed control process implemented usingμC 11.

In S404, the system deviation is calculated from Hall lengths HL_s andHL_i (cf. FIG. 16). The calculation is explained in more detail in FIG.21. The result is a positive control output CNT_R for the magnitude ofthe system deviation, and a sign VZ_R which indicates whether the motoris too fast (VZ_R=0) or too slow (VZ_R=1).

S418 checks whether VZ_R=1. If VZ_R=1, the motor is then too slow, andcapacitor 124 (FIG. 19) must be charged. For that purpose, in S422 portRGL (FIG. 3, FIG. 19) is set to HIGH via RGL:=1. Analogously, in S420port RGL is set to LOW (via RGL:=0) if VZ_R=0, i.e. if the motor is toofast.

Once port RGL has been set, in the example shown in FIG. 20 there is adelay time proportional to the magnitude CNT_R of the system deviation,during which capacitor 124 and thus also capacitor 127 (FIG. 19) arecharged or discharged.

This is done by means of a loop that begins in S424. CNT_R isdecremented by 1, and execution waits for, e.g., 10 μs. S426 then checkswhether CNT_R>0. If so, then the value CNT_R used as the loop counterhas not yet been processed, and execution branches back to S424. IfCNT_R=0 in S426, then the loop has been run through a total of CNT_Rtimes (“CNT_R” meaning the original value CNT_R calculated in S404).

After the loop is complete (S424 and S426), in S428 port RGL is set backto TRISTATE, and charging or discharging of capacitor 124 is terminated.

FIG. 21 shows, using a numerical example, the manner in which controloutput CNT_R and sign VZ_R are calculated from the system deviation,i.e. S404 in FIG. 20. In S440, the difference D_HL between the “Halllength” HL_s corresponding to the rotation speed setpoint and themeasured Hall length HL_i (FIG. 16) is calculated. As an example, arotation speed setpoint of 1000 rpm is assumed, corresponding to a “Halllength” of 15,000 μs and thus a two-byte number 0x3A98. The actualrotation speed here is 1100 rpm, which corresponds to a Hall length of13,636 μs and a two-byte number 0x3544. The difference D_HL is thus0x0554, which is also indicated in binary notation in S440.

S442 checks whether difference D_HL is positive. If so, then in S444VZ_R is set to zero; otherwise in S446 D_HL is calculated from theinverse of the difference (HL_i—HL_s) and is thus positive, and signVZ_R is set to 1.

In S448, D_HL is shifted three times to the right, a zero always beingshifted into the most significant bit (MSB) of HB. The reason forshifting is that control output CNT_R can be only 1 byte long, andsystem deviation D_HL is often too long. Shifting three times to theright corresponds to an integral division by 8, discarding theremainder. The shift causes the information in the three leastsignificant bits of LB to be lost. In the example in S440, the shift isshown in binary notation.

S450 checks whether HB=0 after the three shifts to the right. If it isnot, the shifted D_HL is then still longer than 1 byte, and in S458CNT_R is set to the maximum value 0xFF (binary: 11111111). If Hs=0 inS450, then S452 checks whether LB is also equal to 0. If LB is not equalto zero, then in S456 CNT_R is set to equal LB. In our example above,CNT_R is set to 0xAA (corresponding to decimal 170). If LB was equal to0 in S452, then it is possible that a system deviation neverthelessexisted in the three least significant bits of LB before the shift inS448. To avoid permanently retaining a small system deviation, CNT_R istherefore set to 0x01 in S454. Sign VZ_R and value CNT_R at the end ofthe routine in FIG. 21 are used in FIG. 20 for the control process.

FIG. 22 shows the PWM OFF signal for the case in which RGL=TRISTATE,FIG. 23 shows the OFF signal during charging of adjustable capacitor124, and FIG. 24 shows the OFF signal during discharging of adjustablecapacitor 124.

FIGS. 22A, 23A, and 24A show the control circuit. Triangular oscillator35 is connected to the negative input of comparator 120. Output RGL isdepicted, using an equivalent circuit diagram in the interior of μC 11,for the respective states RGL=TRISTATE, RGL=HIGH, and RGL=LOW. By way ofcurrent limiting resistor 123, RGL leaves adjustable capacitor 124unchanged (FIG. 22), charges it (FIG. 23), or discharges it (FIG. 24).The PWM signal is present at the OFF output with a pulse duty factordefined by the voltage U_C.

FIGS. 22B, 23B, and 24B show the change over time in voltage U_C for therespective state of output RGL; in FIGS. 23B and 24B, RGL is switchedover at time 194 from RGL=TRISTATE to HIGH and LOW, respectively.

FIGS. 22C, 23C, and 24C respectively show, in a voltage/time diagram,voltage U_D of the triangular signal generated by triangular oscillator35, and voltage U_C of adjustable capacitor 124 for the respective stateof output RGL. Note that here the instantaneous value of triangularvoltage U_D is always greater than 0.

FIGS. 22D, 23D, and 24D show the PWM OFF signal resulting from FIGS.22C, 23C, and 24C. In FIG. 22D, the pulse duty factor remains the sameover time, in FIG. 23D it becomes greater as U_C increases, and in FIG.24C [sic] it becomes smaller as U_C decreases.

FIG. 23E shows an enlarged portion 192 of FIG. 23B. The rise in voltageU_C of the capacitor is repeatedly interrupted. This is attributable tothe division of the control process (described in FIG. 29) into smalltime segments or morsels. In FIG. 29, each time the control process isinvoked, RGL is set to HIGH and capacitor 124 is briefly charged. Beforethe control process terminates, RGL is set back to TRISTATE and voltageU_C at capacitor 124 remains constant. In FIG. 23E, charging is labeledCH and the constant intervals are labeled N-CH.

FIG. 24E shows, analogously, an enlarged portion 193 of FIG. 24B for thesituation in which capacitor 124 is being discharged, again for thesequence shown in FIG. 29.

FIG. 25 shows the overall control sequence. In S500, the temperature isdetected via temperature-dependent NTC resistor NTC (FIGS. 2 and 4). InS502, A/D converter A/D converts voltage U_NTC at the NTC resistor intoa digital temperature value NTC_VAL (FIGS. 2, 4, 5, 6, and 7). In S504,a hysteresis HYST of the characteristic is performed (FIGS. 8 and 9). Asensor breakdown function SA in S506 check whether any defect is presentin A/D converter A/D (FIG. 10). In the event of a sensor breakdown,calculation of the rotation speed setpoint is bypassed, a fixed sensorbreakdown rotation speed n_SA is selected in S508, and executionbranches to the Hall length calculation CALC HL_s in S512. Using the NTCvalue NTC_VAL from the hysteresis function HYST, in S510 a rotationspeed setpoint n_s is calculated using a characteristic functionf(NTC_VAL) (FIGS. 11, 12, 13, 14, and 15). In S512 the rotation speedsetpoint is converted by a Hall length calculation CALC HL_s into a“Hall length” HL_s. The actual rotation speed of the motor is detectedin S514 using a Hall sensor that supplies a HALL signal (FIGS. 4, 16,and 17). In S516 (“MEAS HL_i”), the Hall interrupt triggered by the HALLsignal is used to measure Hall length HL_i between two Hall interrupts(FIGS. 16 and 17). Using the two Hall lengths for the setpoint andactual value, in S518 the “CALC” controller calculates a control outputCNT_R for the magnitude of the difference between HL_s and HL_i, and asign VZ_R (FIG. 21). Based on CNT_R and VZ_R, in “OUT” (S520) voltageU_C of a capacitor 124 is increased or decreased (FIGS. 19 and 20). In“PWM” S522, voltage U_C of capacitor 124 is used to set the pulse dutyfactor of the PWM signal (FIG. 19). Lastly, in S524 the speed of themotor is regulated by way of the pulse duty factor of the PWM signal.

FUNCTION MANAGER

FIG. 26 shows a flow diagram with one possible embodiment of the overallprogram that executes in μC 11. After the fan is switched on, aninternal reset is triggered in μC 11. In S600, initialization of μC 11occurs. For example, parameters are read out from EEPROM 26, capacitor124 (FIG. 19) of the PWM control system is charged to a minimum value,and watchdog timer WDCNT 79 for the A/D converter is started.

After initialization, execution branches into a so-called functionmanager 190 that begins in S602. The function manager controls theexecution of the individual subprograms.

The functions processed first are those that are time-critical and mustbe processed at each pass. These include the communication function COMMin S602, since IIC bus 30 (FIG. 18) must be checked, for example at abaud rate of 2 K, every 250 μs. In S604 the A/D converter (S502, FIG.25) is invoked, and in S606 the motor rotation speed control process RGL(S518 and S520 in FIG. 25).

FIG. 27 shows an example of a function register 195 in which one bit isreserved for each further function.

In this example, function register 195 is 1 byte long; and the followingrequest bits are defined, beginning with the least significant bit(LSB), for the requestable functions explained below:

FCT_FILT for the hysteresis and sensor breakdown function;

FCT_PT for the characteristic point determination function;

FCT IPOL for the rotation speed interpolation function;

FCT_HL for the Hall length calculation function for calculating HL_s.

The remaining bits are reserved for further requestable functions thatmay be appended to function manager 190. In this example, functionregister 195 occupies 1 byte, but it can be expanded to includeadditional bytes.

When a specific requestable function needs to be requested by anotherfunction or an interrupt routine, the bit of the requested function isthen set to 1. The next time around, if function manager 190 has notinvoked any other higher-priority requestable function during a pass.the function is executed.

When processing of a requested function is complete, it sets its bit(FIG. 27) back to 0. This makes it possible for functions that cannot beprocessed in one pass (for example because they require too much time)to be divided up and processed in multiple invocations.

In FIG. 26, after S606 a check is made, in a predetermined orderbeginning with the most important requestable function, of whether eachrequest bit is set. If this is the case for a function, it is executed,and the program then branches back to the beginning S602 of functionmanager 190. The sequence in which function register 195 is checkeddefines the prioritization of the requestable functions. The higher upany such function is located in function manager 190, the higher itspriority.

The functions that are invoked must be sufficiently short that theirprocessing time, added to the functions S602 through S606 that arealways executed, is never greater than the maximum allowable timebetween two interrogations of the IIC bus. In the example above with abaud rate of 2 K and a maximum allowable time of 250 μs, the maximumprocessing time for the functions requested in S610 through S624 isapprox. 100 μs. The functions listed in FIG. 25 must therefore in mostcases be subdivided into segments of shorter duration.

The subdivision of the functions shown in FIG. 26 represents only onepreferred example.

Step S610 checks whether request bit FCT_FILT for a filter function isset, i.e. has a value of 1. If it is set, execution then branches toFILT S612, and the hysteresis function (S504, FIG. 25) and sensorbreakdown function (S506 and S508, FIG. 25) are executed in FILT. Theseare referred to as “filter” functions because the hysteresis functionfilters out small fluctuations in the value NTC_VAL in the negativedirection, and the sensor breakdown function filters out impossiblevalues of NTC_VAL. Moving averaging using previous values of NTC_VAL arealso possible.

If FCT_FILT was not set in S610, then PT S614 checks whether FCT_PT isset. If so, then one or both (depending on the calculation variant) ofthe characteristic definition points surrounding the measured valueNTC_VAL are determined in PT S614 and loaded (portion of S510, FIG. 25).

If neither FCT_FILT nor FCT_PT were set in S610 and S614, and ifFCT_IPOL is set in S620, then rotation speed setpoint n_s pertaining tothe value NTC_VAL is calculated in IPOL S622 (portion of S510, FIG. 25).

If none of the bits checked in S610 through S620 were set, and if FCT_HLis set in S624, then in HL S626, the “Hall length” HL_s is calculatedfrom rotation speed setpoint n_s (S512, FIG. 25). Execution thenbranches back to S602.

If a request bit was not set in any of the interrogations up to S624,then execution branches back to S602 with no action, and the functionsthat are executed at each pass of function manager 190 are invokedagain.

The function manager results in optimum utilization of the resources ofμC 11.

An overview of the interaction among the various functions will be givenbelow.

In this exemplary embodiment (FIG. 26), the communication function inS602 is executed first. The external IIC bus 30 (FIG. 18) is read fromor written to, or data are written into or read from the EEPROM.

The A/D converter in S604 is also invoked at each function manager pass.

FIG. 28 shows the A/D converter from FIG. 5 as modified for the functionmanager shown in FIG. 26. Initialization portion 197 in S100 throughS104 is executed in initialization portion INIT in S600 of the mainprogram. The jump into the A/D converter takes place at point A betweenS106 and S108. Execution leaves the A/D converter again at point B, i.e.if the comparison WDCNT>0xFB yields a response of No (N). Step S106 isnot forgotten in this context. If the condition WDCNT>0xFB is no longertrue in S120, then (as in FIG. 5) counter CNT80 constituted by (CNT_HB81, CNT_LB 82) is incremented in S122, and then in S106 watchdog timerWDCNT is set back to 0xFF and the watchdog timer is started again.

After each completed A/D conversion, i.e. when a new value NTC_VAL ispresent in S118, request bit FCT_FILT is set to 1 in S118 so that thefilter function is executed at the next opportunity in S612 (FIG. 26).

In S606 (FIG. 26), control process RGL (S518 and S520, FIG. 25) isinvoked.

FIG. 29 shows an exemplary embodiment of a control process RGL adaptedfor function manager 190, based on FIG. 20. Parts identical orfunctionally identical to those in FIG. 20 are therefore labeled withthe same reference characters as therein, and usually are not describedtherein.

The calculation of CNT_R and VZ_R in S404 requires so much time thatexecution leaves the control process directly after the calculation.This is achieved by introducing a flag FLAG_R. If the condition FLAG_R=1is not met in S400, then another invocation of the control processexists. In S402, FLAG_R:=1 sets FLAG_R to 1 and thus signals that thecontrol process is active. Then, as in FIG. 20, the control calculationis performed in S404 and execution branches out of the control process.

At the next invocation of the control process, FLAG_R=1, i.e. thecontrol process is active, and now capacitor 124 must be charged ordischarged as in steps S418 through S428 of FIG. 20.

The charging or discharging of capacitor 124 must be divided intosmaller blocks, since charging or discharging of capacitor 124 (FIG. 19)of the PWM control system often takes longer than 100 μs.

For that purpose, as shown in FIG. 29, the control process is modifiedso that each time the control process is invoked (S606 in FIG. 26),capacitor 124 is charged or discharged in morsels, so that no invocationof the control process takes longer than the maximum time of, forexample, 100 μs allowed by the IIC bus.

For that purpose, before the decision in S418 (FIG. 29), two furthervariables TMP_R and N, and steps S410 through S416, are introduced. InS410, variable TMP R has assigned to it the value (CNT_R−8), i.e. thecontrol output value CNT_R minus the number 8. If TMP_R>0, then in S412execution branches to S416; otherwise it branches to S414. In S416 (i.e.if CNT_R is greater than 8) a counter variable N is assigned the value 8and CNT_R is assigned the value TMP_R, so that the next time the controlprocess is invoked, the new control output CNT_R is known. In S414 (i.e.if CNT_R is less than or equal to 8), counter variable N is assigned thevalue CNT_R, and FLAG_R is set to 0, since at this invocation of thecontrol process CNT_R is completely processed.

In steps S418 through S428, as in FIG. 20, capacitor 124 is charged ordischarged (depending on sign VZ_R) during one loop pass. In contrast toFIG. 20, however, the loop is not run through CNT_R times, but rather Ntimes, i.e. a maximum of 8 times. This is done by replacing CNT_R with Nin S424′ and S426′.

The overview of the interaction of the various functions in FIG. 26 willnow be continued.

Because FCT_FILT is set by the A/D converter in S604 (FIG. 26), when anew NTC_VAL is present, the hysteresis function (FIG. 9) and sensorbreakdown function (FIG. 10) are invoked at the next opportunity fromS610 (FIG. 26).

Once the hysteresis and sensor breakdown functions are executed in S612,FCT_FILT is set back to 0, and in S612 FCT_PT is set to 1, so thatcharacteristic determination function S618 is invoked at the nextexecution branch to S614.

Once the characteristic determination function in S618 is complete, itsets FCT_PT to 0 and FCT_IPOL to 1. Then lastly, at the next executionbranch to S620, S622 is invoked. Once the rotation speed interpolationfunction in S622 is complete, it sets FCT_IPOL to 0 and FCT_HL to 1.

Since FCT_HL=1, in S624 the Hall length calculation function S626 isthen invoked, and upon its completion FCT_HL is set once again to zero.In S626, a setpoint HL_s for the “Hall length” is calculated.

The function manager makes it possible to insert further subprograms asapplicable, and to adhere to the time limitation imposed by IIC bus 30in simple fashion. It also makes it easy for the subprograms andinterrupt routines to invoke other subprograms.

The configuration of the main program in the form of a function manageris suitable for all devices that have a microprocessor ormicrocontroller which controls both a bus and other tasks, e.g.controlling a motor vehicle engine.

The table below shows typical examples of values for the componentsused:

Capacitors:

135 1.5 nF

127, 152 10 nF

14, 90 22 nF

99, 110, 166, 167 33 nF

154 100 nF

Tantalum capacitor:

124 3.3 μF

Resistors:

140 3 ohms

162, 163 47 ohms

94, 153, 155 1 kohms

133, 136 2.2 kohms

106 3.3 kohms

164, 165 4.7 kohms

123, 131, 132 10 kohms

170 22 kohms

92, 114, 126 33 kohms

134 47 kohms

16, 91, 93, 96, 101, 112, 128, 169 100 kohms

NTC resistor:

18 NTC 100 kohms

npn Transistor 150 BC846

pnp Transistors 95, 168 BC856B

Comparators 108, 120, 130 LM2901D

Hall sensor 40 HW101A

EEPROM 26 AT24C01A two-wire serial CMOS EEPROM (Atmel)

Microcontroller 11 COP 842 CJ (Nat. Semicond.)

What is claimed is:
 1. A electric motor having a rotation speedcontrolled by a variable analog physical parameter characterizing atemperature, comprising: a data field, stored in the form of individualdigital values, for assigning values of said physical parameter tocorresponding rotation speed values of the electric motor; and amicrocontroller adapted for accessing the stored individual digitalvalues, and having associated therewith a program for interpolationbetween individual values stored in the data field, in order todetermine by interpolation, and to control, the rotation speed inrespective ranges between at least two adjacent ones of said storedindividual digital values; further comprising: an A/D converter forconverting the variable physical parameter into a digital value; and ahysteresis function for evaluating data output by the A/D converter andwhich, in the event of a small change in the variable physicalparameter, retains the digital value ascertained during a previous AIDconversion in order to reduce rotation speed fluctuations of the motor.2. The electric motor according to claim 1, wherein the hysteresisfunction is effective in the case of a change in temperature in onedirection, but not in the case of a change in temperature in theopposite direction.
 3. The electric motor according to claim 1, whereinthe individual digital values are stored, at least partially, in vectorform.
 4. The electric motor according to claim 1, further comprising atemperature-dependent resistor for sensing said variable physicalparameter characterizing a temperature.
 5. The electric motor accordingto claim 1, comprising an arrangement for checking whether an overflowoccurs during conversion in said A/D converter.
 6. The electric motoraccording to claim 5, wherein, when an overflow occurs, the digitalvalue resulting from A/D conversion is replaced with a predefineddigital value.
 7. The electric motor according to claim 1, wherein theA/D converter has, downstream from it, a plausibility function whichchecks the digital value ascertained during an A/D conversion forplausibility, and replaces an implausible digital value with apredefined digital value.
 8. The electric motor according to claim 1,wherein a rotation speed controller is associated with the electricmotor, and the signal generated during the A/D conversion is used togenerate a desired value signal for that rotation speed controller. 9.The electric motor (9) according to claim 8, wherein what is used as anactual-value signal is a digital signal which is substantiallyproportional to the time required for the rotor of the electric motor torotate through a predefined rotation angle.
 10. The electric motor (9)according to claim 9, wherein the digital value ascertained during A/Dconversion is converted (S512) into a value for the time to be requiredfor the rotor (39) to rotate through the predefined rotation angle. 11.The electric motor according to claim 10, wherein one of a differencebetween the digital desired value signal and the digital actual-valuesignal, or vice versea, is determined, in order to obtain a digitaldeviation signal (CNT_R) for the magnitude of the deviation betweendesired value and actual value, and a digital sign signal (VZ_R) for thesign of that deviation.
 12. The electric motor (9) according to claim11, wherein a pulse width modulation (PWM) actuator, whose pulse dutyfactor is controllable by the voltage at a capacitor (124), is providedfor controlling the motor current; and that capacitor is charged ordischarged for a time period which is substantially proportional to theabsolute magnitude of the digital deviation signal, the digital signsignal controlling whether the capacitor is charged or discharged. 13.The electric motor (9) according to claim 1, further comprising anonvolatile memory (26) adapted for storing the digital values of thedata field.
 14. The electric motor (9) according to claim 13, wherein atleast some of the individual digital values stored in the nonvolatilememory (26) are modifiable.
 15. The electric motor according to claim14, comprising a terminal adapted for connection to an input device forinputting a value into the nonvolatile memory.
 16. The electric motor(9) according to claim 14, wherein a connection is provided to a databuss over which data can be transferred into the nonvolatile memory. 17.The electric motor according to claim 15 having associated therewith amicrocontroller wherein data transfer to and from the nonvolatile memoryis controllable by said microcontroller.
 18. The electric motoraccording to claim 17, wherein the microcontroller associated with themotor is configured, for data connection with an external input device,as a so-called “slave” of that data connection.
 19. The electric motor(9) according to claim 1, further comprising a counter for countingmotor operating time.
 20. The electric motor (9) according to claim 19,wherein the operating time can be polled from outside.
 21. The electricmotor according to claim 1, wherein the individual digital values areeach stored, at least partially, as a data point with an associatedslope value.
 22. A method for temperature-dependent control of therotation speed of an electric motor having associated therewith a memoryand a rotation speed controller, said method comprising the followingsteps: a) value clusters of characteristic definition points are storedin said memory, said value clusters containing at least one valuecharacterizing a specific temperature, and one rotation speed datumassociated with that specific temperature; b) a sensed valuecharacterizing the temperature that controls the motor rotation speed issensed at time intervals c) the presently sensed value is compared to apreviously sensed value characterizing a temperature sensed during aprevious sensing operation; d) based on the comparison, it isascertained whether the presently sensed temperature either hasincreased, or has decreased by at least a predetermined minimum value;e) if the presently sensed temperature has not increased, and has noteither decreased by at least the predetermined minimum value, apreviously determined desired rotation speed of the electric motor isleft unchanged; f) if the presently sensed temperature either hasincreased, or has decreased by at least the predetermined minimum value,the presently sensed value is compared to the stored valuescharacterizing the temperature and stored in said memory, a stored valueadjacent to the presently sensed value is ascertained, by way of aninterpolation proceeding from that adjacent value, a rotation speeddatum for the presently sensed value is ascertained, and a value derivedfrom that interpolated rotation speed datum is used to determine a newdesired rotation speed for the rotation speed controller.
 23. The methodaccording to claim 22, wherein the interpolated rotation speed datum isascertained by linear interpolation.
 24. The method according to claim23, wherein for at least one characteristic definition point, a slopefor linear interpolation is stored in addition to the valuecharacterizing a specific temperature and a rotation speed datumassociated with that value.
 25. The method according to claim 22,wherein the values stored in the memory are modifiable.
 26. The methodaccording to claim 22, wherein the sensed value characterizing thetemperature is compared to a value characterizing the temperature thatwas sensed during a previous sensing operation; and a change in thevalue serving to define the desired rotation speed is made only ifeither the temperature has increased, or if it has decreased by apredefined minimum value.
 27. The method according to claim 22, whereinthe predefined minimum value is stored as a variable.
 28. The methodaccording to claim 27, wherein the predefined minimum value ismodifiable in the nonvolatile memory via a bus.
 29. The method accordingto claim 22, wherein the presently sensed value characterizing thetemperature is checked for plausibility; and a predefined desiredrotation speed value is generated if that presently sensed valuecorresponds to a temperature that does not occur in practical use, inparticular to a very low temperature.
 30. The method according to claim29, wherein a minimum temperature is assumed for the temperature thatdoes not occur in practical use, and a specific rotation speed datum isassociated with all temperatures which are lower than or equal to thatminimum temperature.
 31. The method according to claim 30, wherein thepredefined minimum temperature and the associated rotation speed datumare stored in a nonvolatile memory and are modifiable.
 32. The methodaccording to claim 31, wherein the electric motor is set to its maximumrotation speed if the sensed value characterizing the temperaturecorresponds to a temperature that does not occur in practical use. 33.The method according to claim 22, wherein a pulse width modulationprocess, having a sawtooth signal present at one input of a comparator,and a voltage defined by a capacitor and modifiable by a microcontrollerat another input of the comparator, are used to control the motorrotation speed.
 34. The method according to claim 33, wherein anymodification in the charge of the capacitor is interrupted at least onceby another process.
 35. An electric motor having its rotation speedcontrolled by a variable physical parameter characterizing atemperature, comprising: an A/D converter for converting the variablephysical parameter into a digital value; a nonvolatile memory forstoring therein a data field in the form of individual digital values,for assigning values of said converted physical parameter tocorresponding rotation speed values of the electric motor; amicrocontroller adapted for accessing the stored individual digitalvalues, and having associated therewith a program for interpolationbetween individual values stored in the data field, in order todetermine by interpolation, and to control, the rotation speed inrespective ranges between at least two adjacent ones of said storedindividual digital values; and a terminal (FIG. 18: 160, 161) forconnection to a data source for inputting data from said data sourceinto said nonvolatile memory under control of said microcontroller, thusenabling a change to be made in the assignment of said convertedphysical parameter to a corresponding rotation speed value.
 36. Theelectric motor according to claim 35, wherein said microcontroller isconfigured, for the data connection with said data source, as aso-called “slave” of that data connection.
 37. The electric motoraccording to claim 36, wherein data in said nonvolatile memory areadapted to be polled via said data connection.
 38. The electric motoraccording to claim 35, wherein the individual digital values are storedin said memory, at least partially, in vector form.
 39. The electricmotor according to claim 35, further comprising a temperature-dependentresistor for sensing said variable physical parameter characterizing atemperature.
 40. The electric motor according to claim 35, comprising anarrangement for checking whether an overflow occurs during conversion insaid A/D converter.
 41. The electric motor according to claim 40,wherein, when an overflow occurs, the digital value resulting from theA/D conversion is replaced with a predefined digital value.
 42. Themotor according to claim 40, in which the microcontroller has a checksumfunction for discrete values stored in the memory.